#ifndef TIMER_H
#define TIMER_H

#include <QWidget>
#include <QTimer>


namespace Ui {
    class Timer;
}

class Timer : public QWidget
{
    Q_OBJECT

public:
    explicit Timer(QWidget *parent = 0);
    ~Timer();
    void countdown(uint t);
    void counter_start(uint sec);
    void open_overtimer(uint sec);
    void close_overtimer();
    void clear();
    void stop();

signals:
    void overtime_signal();

private:
    Ui::Timer *ui;
    QTimer* timer1;
    QTimer* timer2;
    QTimer *overtime_timer;
    int count;
    bool color;
    bool countup;


private slots:
    void timeDone1();
    void timeDone2();
    void overtime_timeDone();

};

#endif // WIDGET_H
